package collection_try;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentMap;

public class MapConCurrentTest {
    public static void main(String[] args) {
        Map<Integer,String> mymap = new ConcurrentMap<Integer, String>() {
            @Override
            public String putIfAbsent(Integer key, String value) {
                return "";
            }

            @Override
            public boolean remove(Object key, Object value) {
                return false;
            }

            @Override
            public boolean replace(Integer key, String oldValue, String newValue) {
                return false;
            }

            @Override
            public String replace(Integer key, String value) {
                return "";
            }

            @Override
            public int size() {
                return 0;
            }

            @Override
            public boolean isEmpty() {
                return false;
            }

            @Override
            public boolean containsKey(Object key) {
                return false;
            }

            @Override
            public boolean containsValue(Object value) {
                return false;
            }

            @Override
            public String get(Object key) {
                return "";
            }

            @Override
            public String put(Integer key, String value) {
                return "";
            }

            @Override
            public String remove(Object key) {
                return "";
            }

            @Override
            public void putAll(Map<? extends Integer, ? extends String> m) {

            }

            @Override
            public void clear() {

            }

            @Override
            public Set<Integer> keySet() {
                return Set.of();
            }

            @Override
            public Collection<String> values() {
                return List.of();
            }

            @Override
            public Set<Entry<Integer, String>> entrySet() {
                return Set.of();
            }
        };

        Map<Integer,String> temp = Map.of(
                1,"bj",
                2,"xg",
                3,"cq",
                4,"hf"
        );

        for(Map.Entry<Integer, String> entry:temp.entrySet()){
            mymap.put(entry.getKey(),entry.getValue());
        }
    }
}
